<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        div{
            font-size: 50px;
        }
        .box1{
            width: 200px;
            height: 200px;
            background-color: #bfa;
            float: left;
        }
        .box2{
            width: 200px;
            height: 300px;
            background-color: orange;
            float: right;

        }
        .box3{
            width: 200px;
            height: 200px;
            background-color: yellow;
            /* 由于box1 浮动，导致box3上移
                可用 clear 来清除浮动元素对当前元素的影响
                clear
                  可选值
                  left 清除左侧浮动元素的影响
                  right 清除右侧浮动元素的影响
                  both  清除两侧对该元素叫大影响的
             */
             clear: both;
        }
    </style>
</head>
<body>
    
    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>
</body>
</html>